/**
 * 订单相关css
 */

// 订单消息
// ##
.order-notice {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
  padding-left: 15px;
  padding-right: 15px;
  overflow: hidden;
  color: $brand-warning;
  white-space: nowrap;
  box-sizing: border-box;
  &.marquee {
    animation: marquee 30s linear infinite;
    &:hover {
      animation-play-state: paused;
    }
  }
}

/* Make it move */

@keyframes marquee {
  0% {
    text-indent: 27.5em;
  }
  100% {
    text-indent: -105em;
  }
}

//帮助链接
a.help {
  display: inline-block;
  height: 22px;
  width: 22px;
  margin-left: 5px;
  line-height: 22px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid $gray-lighter;
  border-radius: 100%;
  cursor: pointer;
  &:hover,
  &:focus {
    color: #fff;
    background: $brand-info;
    border: 1px solid $gray-lighter;
  }
}

//批量操作
//##
//
.batch-operate {
  padding: 10px 15px;
  .operate-title {
    float: left;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .operate-group {
    .btn-operate {
      display: inline-block;
      padding: 6px 12px;
      text-align: center;
      vertical-align: middle;
      border: 1px solid transparent;
      cursor: pointer;
      &:hover {
        border: 1px solid $link-hover-color;
        border-radius: 32px;
      }
    }
    .btn {
      margin-right: 5px;
    }
  }
}

.batch {
  @include clearfix;
  .checkbox-wrapper,
  .return-wrapper,
  .radio-wrapper,
  .operate-wrapper {
    display: inline-block;
  }
  .checkbox-wrapper {
    margin-right: 30px;
  }
  .operate-wrapper {
    float: right;
  }
  .radio-wrapper {
    float: right;
    margin-right: 30px;
  }
}

.batch.batch-top {
  padding-top: 10px;
  padding-bottom: 10px;
}

.batch.batch-bottom {
  padding-left: 30px;
  margin-left: -30px;
  margin-right: -30px;
  margin-bottom: -30px;
  background-color: $gray-lighter;
  line-height: 60px;
  .operate-wrapper {
    a {
      position: relative;
      display: inline-block;
      padding-left: 30px;
      padding-right: 30px;
      color: #fff;
      background-color: $brand-primary;
      cursor: pointer;
    }
    a.disabled {
      pointer-events: none;
      &::after {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(256, 256, 256, .4);
      }
    }
  }
}

//订单行
//##
//
.order-line {
  position: relative;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid $gray-lighter;
  .table {
    margin-bottom: 0;
    border: none;
    > tbody > tr > td {
      border: none;
    }
  }

  img.order-status {
    height: 40px;
  }
}

// 订单选择
// ##
//
.order-check {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 0;
  width: 30px;
  & + .order-info {
    padding-left: 30px;
  }
}

//订单信息
//##
//
.order-info {
  width: 100%;
  @media screen and (min-width: $screen-lg-min) {
    padding-right: 261px;
  }
}

//订单描述
.order-info .order-desc {
  //订单号
  .order-number {
    font-size: $font-size-large;
    color: darken($text-color, 20%);
    margin-bottom: 5px;
    line-height: 30px;
  }
  .order-tag {
    line-height: 30px;
  }
  .order-text {
    display: inline-block;
    margin-right: 10px;
    .source-img {
      max-height: 18px;
      vertical-align: middle;
      margin-left: 12px;
    }
  }
}

//异常信息
.order-info .order-anomaly {
  margin-bottom: 15px;
  .anomaly-title {
    font-size: 48px;
    margin-bottom: 0;
  }
  .anomaly-box {
    height: 100%;
    width: 100%;
    border: 1px solid #e4eaec;
    border-radius: 2px;
  }
}

//订单项
.order-info .order-item {
  .item-img {
    height: 80px;
    border: 1px solid $brand-primary;
    padding: 3px;
    border-radius: 3px;
  }
  .item-title {
    font-weight: bold;
    a {
      color: $link-hover-color;
    }
  }
  .item-text {
    margin-right: 10px;
  }
}

//订单来源
.order-info .order-source {
  margin-bottom: 10px;
  padding-right: 30px;
  text-align: right;
  color: #a8b1b9;
  font-size: 12px;
  .source-img {
    height: 14px;
    vertical-align: middle;
    margin-left: 12px;
    margin-top: -4px;
  }
  @media screen and (min-width: $screen-lg-min) {
    padding-right: 0;
    margin-bottom: 0;
  }
}

//订单信息与订单操作分割线
//##
//
.order-divider {
  display: none;
  @media screen and (min-width: $screen-lg-min) {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 240px;
    width: 1px;
    background: $brand-default;
  }
}

//订单操作
//##
//
//
.order-operate {
  .operate-box {
    display: inline-block;
    &.box1 {
      display: inline-block;
      width: 70%;
      margin-bottom: 20px;
      padding-left: 30px;
    }
    &.box2 {
      display: inline-block;
      width: 30%;
      text-align: right;
      padding-right: 30px;
      margin-bottom: 20px;
    }
    &.box3 {
      display: inline-block;
      width: 100%;
      height: 50px;
      line-height: 50px;
      padding-left: 30px;
      padding-right: 30px;
      background-color: $brand-default;
      p {
        float: right;
        margin-left: 20px;
        select {
          width: 180px;
        }
      }
    }
    &.box4 {
      display: none;
    }
  }
}

@media screen and (min-width: $screen-lg-min) {
  .order-operate {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 240px;
    //操作
    .operate-box {
      position: absolute;
      text-align: center;
      color: $gray-light;
      &.box1 {
        top: 0;
        left: 0;
        width: 100%;
        padding: 0;
        text-align: center;
        line-height: 40px;
      }
      &.box2 {
        bottom: 40px;
        left: 0;
        width: 100%;
        padding: 0;
        text-align: center;
        line-height: 40px;
      }
      &.box3 {
        left: 50%;
        top: 30%;
        margin-left: -120px;
        padding-left: 10px;
        padding-right: 10px;
        width: 240px;
        height: 60px;
        line-height: 24px;
        background: none;
        p {
          float: none;
          margin-left: 0;
          margin-bottom: 5px;
        }
        .btn {
          min-width: 100px;
        }
        .order-detail {
          display: none;
        }
      }
      &.box4 {
        display: block;
        left: 0;
        right: 0;
        bottom: 0;
        height: 40px;
        background-color: $brand-default;
        a {
          display: block;
          position: relative;
          width: 33.333333%;
          float: left;
          color: $gray-light;
          line-height: 40px;
          &:hover {
            color: $gray;
          }
        }
        a.disabled {
          &:after {
            content: ' ';
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, .3);
            cursor: not-allowed;
          }
        }
      }
    }
  }
}

//订单添加
//#
//
.order-new {
  .edit-panel {
    @include clearfix;
    margin-bottom: 40px;
  }
}

.edit-panel .edit-header {
  height: 45px;
  margin-bottom: 30px;
  line-height: 45px;
  border-bottom: 2px solid $brand-primary;
  .edit-title {
    width: 150px;
    margin-left: 60px;
    text-align: center;
    color: #fff;
    background: $brand-primary;
    border-radius: 3px 3px 0 0;
  }
}

.edit-panel .edit-row {
  padding-left: 30px;
  padding-right: 30px;
  .edit-column {
    margin-bottom: 30px;
  }
  .control-label {
    padding: 0;
    padding-right: 15px;
  }
  .control-label.required {
    position: relative;
    &:after {
      content: '*';
      color: $brand-danger;
      position: absolute;
      right: 0;
      top: 0;
    }
  }
}

.edit-panel .edit-footer {
  line-height: 50px;
  padding-left: 60px;
}

.edit-panel #products {
  .product-line {
    border-bottom: 1px solid $brand-default;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
}

//订单详情
//#
//
.order-detail {
  position: relative;
  .table {
    margin-bottom: 0;
    border: none;
    > tbody > tr > td {
      border: none;
    }
  }
  .order-info {
    padding-left: 0;
  }
  .order-message {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1;
    width: 260px;
    background: #FFFFFF;
    border-radius: 0 3px 3px 0;
  }
  .order-status-bar {
    position: relative;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
    @include clearfix;
    .order-status-detail {
      position: absolute;
      left: 14px;
      right: 14px;
      top: 0;
      bottom: 0;
      line-height: 40px;
      text-align: center;
      border-radius: 3px;
      &.error {
        background: #FA7A7A;
        color: #FFFFFF;
        text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.23);
      }
      &.info {
        background: $brand-info;
        color: #FFFFFF;
        text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.23);
      }
    }
    .order-status {
      height: 40px;
      line-height: 40px;
      background: #F3F7F9;
      color: #526069;
      .status-number {
        display: inline-block;
        height: 30px;
        width: 30px;
        margin-right: 10px;
        margin-top: -3px;
        line-height: 30px;
        text-align: center;
        color: #FFFFFF;
        vertical-align: middle;
        border-radius: 30px;
        background: #E4EAEC;
      }
    }
    .order-status.active {
      background: #65A9E8;
      color: #FFFFFF;
      .status-number {
        color: #65A9E8;
        background: #FFFFFF;
      }
    }
  }
  .detail-edit {
    @include clearfix;
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

.edit-block {
  .edit-static {
    .edit-btn {
      display: inline-block;
      height: 30px;
      width: 30px;
      line-height: 30px;
      text-align: center;
      color: #FFFFFF;
      vertical-align: middle;
      cursor: pointer;
      border-radius: 30px;
      background: $brand-primary;
    }
  }
  &.sell-info {
    padding: 30px;
    border: 1px solid $brand-default;
    @include clearfix;
    .edit-btn {
      position: absolute;
      top: 20px;
      right: 30px;
    }
  }
}

.order-message {
  padding: 20px;
  overflow: hidden;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 1px;
    background: $brand-default;
  }

  ul {
    padding-left: 0;
    list-style: none;
  }
  .message-header {
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    color: #37474F;
    line-height: 22px;
  }
  .message-box {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
    .message-avatar {
      display: inline-block;
      height: 30px;
      width: 30px;
      position: absolute;
      top: 0;
      left: -15px;
      border-radius: 30px;
    }
    .message-time {
      width: 80%;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 10px;
      color: #4A4A4A;
      font-size: 12px;
      text-align: center;
      line-height: 30px;
      background: #E6ECED;
      border-radius: 30px;
    }
    .message-content {
      padding: 10px;
      color: #526069;
      font-size: 12px;
      background: #F3F7F9;
      border-radius: 3px;
      &.error {
        background: #FFF2F2;
        color: #FA7A7A;
      }
    }
  }
}

.order-export {
  .panel.field-option {
    position: relative;
    border: 1px solid lighten($gray-lighter, 3%);
    .panel-heading {
      padding: 15px;
      line-height: 35px;
      font-size: 16px;
      border: none;
    }
    .field-group {
      list-style: none;
      padding-left: 15px;
      padding-right: 15px;
      @media screen and (min-width: $screen-md-min) {
        min-height: 500px;
      }
      .field-item {
        display: block;
        margin-bottom: 10px;
      }
    }
    .panel-footer {
      padding: 15px;
    }
  }
  .panel.field-select {
    box-shadow: none;
    .panel-heading {
      border: none;
      h3 {
        margin: 0;
        padding: 0;
        font-size: 18px;
        color: #526069;
      }
    }
    .field-group {
      border: 1px solid lighten($gray-lighter, 3%);
      min-height: 200px;
      padding: 10px 25px;
    }
    .field-item {
      display: inline-block;
      background: $brand-primary;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 3px;
      margin-left: 10px;
      margin-bottom: 10px;
      .field-num {
        background: #FFFFFF;
        color: $brand-primary;
      }
      .field-name {
        background: $brand-primary;
        border: none;
        color: #FFFFFF;
        width: 90px;
        padding-left: 5px;
        padding-left: 5px;
        &:focus {
          outline: none;
        }
      }
      .remove {
        background: $brand-primary;
        color: #FFFFFF;
        font-size: 12px;
        vertical-align: middle;
        cursor: pointer;
      }
    }
  }
}

.order-add-handler {
  .handler-title {
    font-size: 18px;
    margin-bottom: 30px;
  }
  .handler-row {
    padding: 30px;
    margin: 30px 0;
    border: 1px solid $brand-default;
    .btn {
      width: 120px;
    }
  }
  .handler-icon {
    display: inline-block;
    height: 100px;
    width: 100px;
    padding-top: 4px;
    vertical-align: middle;
    line-height: 100px;
    text-align: center;
    color: #FFFFFF;
    background: $brand-primary;
    border-radius: 80px;
  }
}

.order-import {
  .import-operate {
    p {
      margin-bottom: 30px;
    }
  }
  .btn-import {
    position: relative;
    input[type="file"] {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      opacity: 0;
      cursor: pointer;
    }
  }
}

.order-fetch {
  .fetch-operate {
    text-align: right;
    > a {
      margin-left: 20px;
    }
  }
  .fetch-title {
    font-size: 18px;
    margin-bottom: 30px;
  }
}

.order-scan {
  .scan-header {
    margin: -30px -30px 0 -30px;
    padding: 30px;;
    background: $brand-default;
    .scan-info {
      font-size: 18px;
      .order-num {
        margin-left: 10px;
        margin-right: 10px;
        color: $brand-primary;
        font-size: 32px;
        vertical-align: middle;
      }
      .order-link {
        font-size: 14px;
      }
    }
    .input-group-scan {
      width: 100%;
      line-height: 30px;
      @include clearfix;
      input,
      .btn-scan,
      .btn-deliver {
        display: table-cell;
        height: 100px;
        width: 100%;
        float: left;
        line-height: 60px;
        font-size: 32px;
        background: none;
        border: none;
        &::focus {
          outline: none;
        }
      }
      input {
        background: #fff;
      }

      input, button {
        &:focus, &:active {
           outline: none;
        }
      }
      .btn-scan {
        background: #f8f8f8;
      }
      .btn-deliver {
        color: #fff;
        background: $brand-primary;
      }
    }
  }
  .order-line {
    border: none;
  }
  .order-info {
    padding-right: 0;
  }
}

//订单为空
//
.order-empty {
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid $gray-lighter;
  text-align: center;
  .empty-content {
    max-width: 400px;
    margin: 0 auto;
    img {
      width: 200px;
    }
    .title {
      margin-top: 30px;
      margin-bottom: 30px;
      font-size: 24px;
    }
    .info {
      margin-bottom: 20px;
    }
  }
}

.table {
  &.table-center {
    > thead > tr > td,
    > tbody > tr > td {
      text-align: center;
    }
  }
}

//分页显示
//##
//
.paginations {
  padding-top: 20px;
  .input-group {
    width: 180px;
  }
  @media screen and (min-width: $screen-lg-min) {
    .pageindex {
      float: right;
    }
  }
}